// 版权归 Epic Games, Inc. 所有。保留所有权利。

#pragma once

#include "LyraTabListWidgetBase.h"
#include "UI/Foundation/LyraButtonBase.h"

#include "LyraTabButtonBase.generated.h"

#define UE_API LYRAGAME_API

class UCommonLazyImage;
class UObject;
struct FFrame;
struct FSlateBrush;

UCLASS(MinimalAPI, Abstract, Blueprintable, meta = (DisableNativeTick))
class ULyraTabButtonBase : public ULyraButtonBase, public ILyraTabButtonInterface
{
	GENERATED_BODY()

public:
	/**
	 * 从延迟对象设置图标
	 * @param LazyObject 延迟对象指针
	 */
	UE_API void SetIconFromLazyObject(TSoftObjectPtr<UObject> LazyObject);

	/**
	 * 设置图标画刷
	 * @param Brush 画刷引用
	 */
	UE_API void SetIconBrush(const FSlateBrush& Brush);

protected:
	/**
	 * 设置选项卡标签信息实现
	 * @param TabLabelInfo 选项卡描述符
	 */
	UFUNCTION()
	UE_API virtual void SetTabLabelInfo_Implementation(const FLyraTabDescriptor& TabLabelInfo) override;

private:
	UPROPERTY(meta = (BindWidgetOptional))
	TObjectPtr<UCommonLazyImage> LazyImage_Icon; // 延迟加载图标控件
};

#undef UE_API